/*
 * LevelupRewardResource.h
 *
 *  Created on: 2013. 11. 11.
 *      Author: mega@gamevil.com
 */

#ifndef LEVELUPREWARDRESOURCE_H_
#define LEVELUPREWARDRESOURCE_H_

#include <map>

namespace ProjectZ { namespace NResource {

class LevelupRewardResource
{

public:
	class LevelupRewardData
	{
	public:
		struct Flyweight
		{
			int _LEVEL;
			int _GOLD;
		};

	public:
		LevelupRewardData();
		virtual ~LevelupRewardData();

		bool		LoadResource(int company, int salecode);
		Flyweight *	GetFly(int level);

	private:
		void	Clear();

	public:
		typedef std::map<int, Flyweight *>	LEVELUPREWARDTREE;

	private:
		LEVELUPREWARDTREE	clsFlyTree;
	};

public:
	LevelupRewardResource();
	virtual ~LevelupRewardResource();

	bool	LoadResource();
	LevelupRewardData::Flyweight * GetFly(User * pUser);

private:
	LevelupRewardData * pLevelupRewardAD;
	LevelupRewardData * pLevelupRewardIOS;
};

} /*NResource*/ } /*ProjectZ*/

#endif /* LEVELUPREWARDRESOURCE_H_ */
